#include "febugwidget_private.h"
#include <QPainter>
#include <QPaintEvent>

FeBugWidget::FeBugWidget(QWidget *parent)
: QWidget(parent)
{
}

FeBugWidget::~FeBugWidget()
{
}

void FeBugWidget::paintEvent(QPaintEvent *e)
{
	// DEBUG
	/*{
		QByteArray name = objectName().toLatin1();
		qDebug("Paint %s %d,%d,%d,%d",
			name.constData(),
			x(),
			y(),
			width(),
			height());
	}*/

	QPainter p(this);
	p.fillRect(e->rect(), Qt::red);
	if(width() > 5 && height() > 5)
	{
		p.setPen(Qt::white);
		p.drawRect(0, 0, width(), height());
		p.setPen(Qt::black);
		p.drawRect(1, 1, width()-2, height()-2);	
	}
}